.container {
  height: 50px;
  border: 1px solid black;
  position: relative;
  margin: 20px 0;
}
.length {
  position: absolute;
  left: 50%;
}
.item {
  background: lightblue;
  height: 100%;
  max-width: 100%;
  transition: width 0.1s ease-in-out;
}
.red {
  background: red;
}
